import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.geom.Ellipse2D;

import javax.swing.JFrame;

public class CircleTest extends JFrame {
    static int x = 0;
    static int y = 0;
    Shape circle = new Ellipse2D.Float(100.0f, 100.0f, 100.0f, 100.0f);

    public void paint(Graphics g) {
        Graphics2D ga = (Graphics2D) g;

        g.setColor(Color.black);
        g.fillOval(100, 100, 300, 300);
        g.setColor(Color.red);
        g.fillArc(100, 100, 300, 300, x % 360 + 90, 180);

        g.setColor(Color.yellow);
        g.fillOval(500, 100, 300, 300);
        g.setColor(Color.blue);
        g.fillArc(500, 100, 300, 300, y % 360 + 90, 180);

    }
}
